import numpy as np
import pandas as pd


def conv_arr_to_df(df: (np.ndarray, pd.DataFrame), columns=None):
    if not isinstance(df, pd.DataFrame):
        assert isinstance(df, np.ndarray)
        if not columns:
            cols = df.shape[1]
            columns = [f"col_{i}" for i in list(range(cols))]
        df = pd.DataFrame(df, columns=columns)
    return df

